<template>
  <div class="music_list">
    <div class="musicTop">
      <div class="title">发现好歌单</div>
      <div class="more">
        <van-button round plain hairline type="primary" size="small" color="black"
          >查看更多</van-button
        >
      </div>
    </div>
    <div class="musicShow">
      <base-swipe :images="ImgUrl" v-bind="swipeConfig"></base-swipe>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { defineProps, withDefaults, computed } from 'vue'
import baseSwipe from '@/base_ui/Yswipe/base_swipe.vue'
import { useStore } from '../../store/index'

const props = withDefaults(
  defineProps<{
    pageName: string
  }>(),
  {}
)
const store = useStore()
//获取轮播图tupian
const getContent = () => {
  store.dispatch('banner/getBannerList', props.pageName)
}
getContent()
const ImgUrl = computed(() => store.getters['banner/getDataList'](props.pageName))
//
//轮播图的配置
const swipeConfig: any = {
  indicator_color: 'rgb(155, 203, 240)',
  lazy_render: false,
  show_indicators: false,
  width: 110,
  loop: false
}
</script>

<style scoped lang="less">
.music_list {
  width: 100%;
  padding: 0.2rem;
  .musicTop {
    width: 100%;
    height: 0.6rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
    .title {
      font-size: 0.4rem;
      font-weight: 900;
    }
  }
  .musicShow {
    width: 100%;
    height: 100%;
  }
}
</style>
